#include<stdio.h>
int main()
{
    int n,a;
    scanf("%d",&n);
    if(n<=100000)
        a=0.1*n;
    else if(n>100000&&n<=200000)
        a=10000+0.075*(n-100000);
    else if(n>200000 && n<=400000)
        a=17500+(n-200000)/20;
    else if(n>400000&&n<=600000)
        a=27500+0.03*(n-400000);
    else if(n>600000&&n<=1000000)
        a=33500+0.015*(n-600000);
    else if(n>1000000)
        a=39500+0.01*(n-1000000);
    printf("%d",a);
    return 0;
}

